package ru.averta.notes.service.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.*;

import ru.averta.notes.dao.FolderDao;
import ru.averta.notes.domain.Folder;
import ru.averta.notes.domain.flags.IViewable;
import ru.averta.notes.service.FolderService;


@Service
public class FolderServiceImpl extends GenericBusinessObjectService<Folder, Long, FolderDao> implements FolderService {
	
	private FolderDao dao;

	@Autowired
	public void setDao(FolderDao dao) {
		this.dao = dao;
		super.setGenericDao(dao);
	}

	public Collection<IViewable> findViewSubElementsByUserId(long userId) {
		return null;
	}


	public Collection<Folder> findFoldersByUserIdWithSubFolders(long userId) {
		return dao.findByUserIdWithSubFolders(userId);
	}
	
}
